<?php

class Application_Model_DbTable_ZFEurozone extends Zend_Db_Table_Abstract {

    protected $_name = 'zf_eurozone';

    public function isEuroZone($countryCode) {
        $countryCode = strtoupper($countryCode);
        $select = $this->_db->select()
                        ->from($this->_name, array('code_country', 'eurozone_id'))
                        ->where('code_country = ?', $countryCode);
        $resultsa = $this->getAdapter()->fetchPairs($select);
        if (is_array($resultsa)) {
            if ($resultsa[$countryCode] > 0) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }

}
?>